package com.ihd.ihardwaretools.api;


import com.ihd.ihardwaretools.pojo.EmptyRes;
import com.ihd.ihardwaretools.pojo.ListRes;
import com.ihd.ihardwaretools.pojo.LoginRes;

import cn.wowjoy.commonlibrary.utils.HttpUtils;
import io.reactivex.Flowable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;


public interface HttpClient {

    static HttpClient getService() {
        return HttpUtils.getInstance().getServer(HttpClient.class);
    }

    //发送短信验证码
    @Headers("x-amazing-token:0")
    @POST("datacenter/api/v1/sms/sendVerifySms")
    Flowable<EmptyRes> sendVerifySms(@Body RequestBody param);

    //登录
    @Headers("x-amazing-token:0")
    @POST("marketingcenter/api/v1/vendorEquipment/login")
    Flowable<LoginRes> login(@Body RequestBody param);

    //密码找回
    @Headers("x-amazing-token:0")
    @POST("usercenter/api/v1/user/resetPwd")
    Flowable<LoginRes> resetPwd(@Body RequestBody param);

    //设备绑定
    @POST("marketingcenter/api/v1/vendorEquipment/bind")
    Flowable<EmptyRes> bind(@Body RequestBody param);

    //设备信息列表查询
    @GET("marketingcenter/api/v1/vendorEquipment/queryList")
    Flowable<ListRes> queryList(@Query("adminId") String adminId, @Query("pageNum") int pageNum, @Query("pageSize") int pageSize, @Query("beginModifyTime") String beginModifyTime, @Query("endModifyTime") String endModifyTime);
}
